package jwf.http;

import java.io.IOException;

import jwf.fcgi.FCGXRequest;

public class Response {

    private Header header;
    private FCGXRequest fcgxReq;

    public Response(FCGXRequest fcgxReq) {
	header = new Header();
	this.fcgxReq = fcgxReq;
    }

    public Header getHeader() {
	return header;
    }

    public void writeRaw(String str) {
	try {
	    fcgxReq.putStr(str);
	} catch (IOException e) {
	    e.printStackTrace();
	}
    }

    public void outputHeader() {
	try {
	    fcgxReq.putStr(header.toString());
	} catch (IOException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	}
    }
}
